home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_058 / hyperbase / manual < prev    next >
Text File  |  1992-05-06  |  21KB  |  561 lines

  1.         HyperBase (c) 1987 
  2.               by 
  3.         General Design
  4.         P.O. Box 2352
  5.         West Lafayette,  IN  47906
  6.     
  7.     
  8.         Programming Team
  9.     
  10.         Michael MacKenzie
  11.         Marc Mengel
  12.         Craig Norborg
  13.     
  14.     
  15.     Using HyperBase Main Menu Options
  16.  
  17. PART ONE - FILE OPTION 
  18.     New: This allows you to start a new datafile using the current
  19.         format file that is displayed on the format file status line.  
  20.  
  21.     Open:  The open option allows you to open up a new format file, 
  22.         printer format file, or sort index.  The sub menu attached 
  23.         to open contains either:
  24.  
  25.         Database:  Which allows you to open either just a new datafile
  26.         or a new datafile and all the default files with it; or
  27.  
  28.         Format:  Which allows you to open a new format file for the
  29.         screen.  BEWARE!  There is no check to see that the format 
  30.         file "fits" the data file, so be sure you are opening a 
  31.         valid format for the current database!
  32.  
  33.         Printer:  This allows you to read in a new printer format for
  34.         the current database.  Also beware on this to have a valid 
  35.         format for the current data.  The printer format will 
  36.         first load a ".prt" file associated with the name typed in 
  37.         and if one is not available, it will load a ".fmt" file 
  38.         instead.
  39.  
  40.         Index:  This option allows you to read in a previously made
  41.         sort index for this datafile.  Be very careful to read in
  42.         a valid sort index for this datafile, or you will have 
  43.         unpredictable results!
  44.  
  45.         When one of the Open options is chosen, a request will be
  46.         put on the screen allowing the user to chose the file of
  47.         his choice.  If the user has chosen the Database
  48.         sub-option, he will be prompted to open either the datafile
  49.         only or all the files associated with a datafile.  What
  50.         this means is that if you open up the datafile named "foo",
  51.         that you could just open this datafile, or open "foo",
  52.         "foo.fmt" (the format file), and "foo.ind" (the sort
  53.         index).
  54.  
  55.     Print:  This option is to print out the entire database, in the 
  56.         current sort order, using the current printer layout.  
  57.  
  58.     Cleanup:  This option will really delete all records previously 
  59.         flagged as being deleted.  The old version of the database
  60.         is left on the disk under the name datafile.bak, so    if you 
  61.         don't have enough disk space for another copy of the 
  62.         database, it would be best to get rid of any un-needed files 
  63.         so you have enough room to perform this operation.
  64.  
  65. PART TWO - SORT OPTIONS 
  66.     Sort:  This option allows the user to sort his datafiles.  As of 
  67.     this release, the user must input the field numbers by which 
  68.     he wants to sort on.  For example, if the name field was 
  69.     field number 1, and the state field was field number 2, and 
  70.     you wanted to sort by state, and then name (for all states that
  71.     were the same) you would type in 2 [ret] 1 [ret] then by a "." 
  72.     to indicate that you are finished.  One thing we should mention 
  73.     to the user is that if you wish to improve the speed in which 
  74.     the database sorts, we have provided an adjustable internal buffer 
  75.     for your convenience.  As of this release, it is controlled by 
  76.     the third command line argument and defaults to a size of 20.  
  77.     What this would mean is that if your datafile was less than 20 
  78.     records long, it would sort it all in RAM (which is faster).  
  79.     By setting this to a larger value for larger datafiles, you can 
  80.     greatly improve the speed of sorting on these datafiles.  For 
  81.     an example, if you had a datafile of 800 names for a mailing 
  82.     list called "mail" and you wanted to make the buffer size be
  83.     1/4 of the file size, you would type in:
  84.  
  85.         "hyperbase mail 200" 
  86.     
  87.     
  88.     and this would invoke hyperbase with the datafile called "mail" 
  89.     with a buffer size of 200!  
  90.  
  91.     Save Index:  This option allows the user to save the previously 
  92.     created sort index.  You will be asked a file name for the 
  93.     sort index to be put under and a ".ind" will be appended to 
  94.     the file name so it is easily identifiable as a sort index.  
  95.  
  96. PART THREE - SEARCH OPTIONS 
  97.     
  98.     Search:  The search option is used to search for a record, or a 
  99.      set of records.  The way this is done is, after you select 
  100.      the search option, a screen with a blank datafile format 
  101.      appears on the screen.  You then go to as many fields as 
  102.      you wish and use the backwards arrow (<-) to position your
  103.     cursor in the position BEFORE the field you wish to search 
  104.     for.  In this one-character field, you may input one of:
  105.         ">"             Greater Than 
  106.         "<"             Less than
  107.         "="             Equal to 
  108.         "!"             Not equal to
  109.     and search according to whatever you then type into the 
  110.     field.  By leaving a field blank, it will default to every 
  111.     record being a match.
  112.  
  113.     Display:
  114.  
  115.     Screen: This will bring the database up in a "browse" type
  116.         mode on the screen where you can look at the found records 
  117.         one by one.
  118.  
  119.     Printer: This will print out the results of your search using
  120.         the current printer format.  If no printer format was 
  121.         specified, the current screen format will be used.  
  122.  
  123.     Delete Found:  This is a very useful option, which will allow 
  124.         you to delete all records that were found in the last search.  
  125.  
  126.     Delete not Found:  This option is very much like the last one, 
  127.         but allows you to delete all records not found in the last 
  128.         search.
  129.  
  130.     Search for Deleted: This option searches for records that are
  131.         marked as deleted, but haven't actually been removed by 
  132.         the Cleanup facility.  After doing this, you can go into 
  133.         your datafile using the Browse option and undelete records 
  134.         just like you delete records.  
  135.  
  136. PART FOUR - BROWSE OPTIONS 
  137.  
  138.     View:  This command will put you in "view" mode where you will be 
  139.     able to look at your datafile, but not change any of the data 
  140.     fields within it.  
  141.     
  142.     Insert:  This command allows you to  go into your datafile and 
  143.     change data or add new data.  It looks like "view" mode, but 
  144.     allows one to change data. The database inserts records in 
  145.     sorted order. This means that if you have specified a sort
  146.     order for this database, new records will be inserted in sorted
  147.     order, and the current record number may change.
  148.  
  149.  
  150. Using HyperBase Browse Menu Options
  151.  
  152.     PART ONE - FILE OPTIONS
  153.  
  154.     Save:  This option allows the user to save the changes made
  155.         while in a browse mode.
  156.  
  157.     Redraw:  This option is for redrawing a screen that may have
  158.         become corrupted in some manner.
  159.  
  160.     Quit:  This option allows the user to quit and not save any
  161.         changes made to the database in the current editing session.  
  162.  
  163.     PART TWO - EDIT OPTIONS
  164.  
  165.     Kill Field:  This option allow you to easily kill all
  166.         text/numbers in an entire field in one keystroke.
  167.  
  168.     Delete:  This option allows the user to mark a record as deleted.
  169.         NOTE:  This option only flags the record as deleted in the 
  170.         datafile, to actually delete the record, one must use 
  171.         the "cleanup" option from the main menu.
  172.  
  173.     UnDelete:  This option is a special option that only shows up
  174.        when in undelete record mode from the main menu.  It takes 
  175.        the place of delete in the menu structure, and will allow 
  176.        a user to "undelete" a record by resetting the delete flag. 
  177.        Once the "Cleanup" option is used, undeleting records 
  178.        previously deleted will not work!  
  179.  
  180.     PART THREE - BROWSE OPTIONS
  181.     The browse options allow the user to go forward and backward
  182.     through the database.  Browsing through a database depends
  183.     on the sort order to find its records and it will be necessary
  184.     to have a sort index loaded or use the Sort option from the main
  185.     menu before browsing through the datafile.  
  186.     
  187.     Forward:  This option allows the user to go forward one record 
  188.         in the database according to the current sort order.
  189.  
  190.     Back:  This option allows the user to go back one record in the
  191.         database according to the current sort order.
  192.  
  193.     Goto:  This option prompts the user for a record number to go
  194.         to and proceeds to go to that record.  If the record number 
  195.         input is greater than the amount of records, it will go to 
  196.         the last record in the database.  Negative record numbers 
  197.         will not be permitted.
  198.  
  199.  
  200. Format File Options
  201.  
  202.     Valid operators for for use in a formula are:  
  203.     +       -     Addition 
  204.     -       -       Subtraction 
  205.     *       -       Multiplication
  206.     /       -       Division 
  207.     &       -       String Catenation 
  208.     []    -       SubString Operations 
  209.  
  210.     Valid characters for building an input format are:  
  211.     #       -       Allows input of one numeric character.
  212.     _       -       Allows input of one alphanumeric character.  (Underbar)
  213.     ^       -       Makes the user type return, tab, or right 
  214.             arrow to go onto the next field.  This is 
  215.             only valid at the end of a field.  It prevents
  216.             the user from accidentally typing into the
  217.             next field.
  218.  
  219.     Any other alphanumeric character in an input format is taken to 
  220.     be a literal character that shows up in a field.  For example,
  221.     the dashes in a telephone number, or the dash in a zip code, etc.  
  222.     If such a character is put in the field, it will be skipped over 
  223.     during input, it will not show up in the datafile, and the user 
  224.     will not allowed to type on it.  
  225.  
  226.     If you wish to put a comma, quote or backslash as a literal 
  227.     character in a format, you must put a backslash before this 
  228.     character. 
  229.  
  230.     Each line of a format file consists of:  
  231.  
  232.         1) A Label 
  233.         2) A Row Number 
  234.         3) A Column Number 
  235.         4) A Page Number (currently unimplemented, use 1) 
  236.         5) An Output Format (used only with formulas) 
  237.         6) A Formula (optional) 
  238.         7) An Input Format (optional) 
  239.  
  240.     Each is followed by a comma.  For example:  
  241.     
  242.         Label, 1, 1, 1, $###, {1} + {2}, ______, 
  243.     
  244.     defines a format which prints the label "Label" at row 1, 
  245.     column 1, on page number 1.  It allows the input of 6 
  246.     alphanumeric characters, adds fields 1 and 2 and outputs a $ 
  247.     followed by the first three characters of the result.
  248.  
  249.     The row, column, and page fields must be filled in.  The label
  250.     can be empty, but must still have the comma.  This is the same
  251.     with the output format, formula and the input format.
  252.  
  253.         ,10,20,1, , , , 
  254.     produces a field at row 10, column 20, page 1 which has no label, 
  255.     output format, formula, or input format.  (essentially a blank line) 
  256.  
  257.     There are also sub-string and catenation operations in
  258.     HyperBase that will allow you to take apart and re-assemble
  259.     strings. To get part of a string, put a pair of brackets after
  260.     a string designator and put either one number or a pair of
  261.     numbers separated by a comma.  A string designator is anything
  262.     that represents a string.  You can catenate two strings and
  263.     take a substring of the resulting string or any combination of
  264.     catenations and substrings.  One thing you must make sure to
  265.     do is to parenthesis your string catenations so the substring
  266.     operator knows which string to take a substring of.  For
  267.     example:
  268.  
  269.         ({1} & {2})[10,20] 
  270.         
  271.     will take fields 1 and 2, catenate them together, and then pull
  272.     out the tenth through twentieth characters of the result.  That 
  273.     is, if field 1 is "abcdfghijklmn" and field 2 is "ABCDEFGH",
  274.     the above formula would result in "klmnABCDEF"
  275.     To take a single character out of a string, you only put one number 
  276.     in the brackets.  For example:
  277.  
  278.         {22}[13] 
  279.  
  280.     will take the 13th character in field 22 and return this.  
  281.  
  282.     Printer Format Files:  The printing format file is identical
  283.     to the screen format file, except for that all of its formulas are
  284.     based on the current screen field numbers.  Feel free to use them
  285.     interchangeably, although a special printer format file may 
  286.     sometimes be necessary.  If  you wish to put in a form feed in 
  287.     the printer format file to start each record on a page of its own,
  288.     you should create a field with a label of cntl-L.  Use this same 
  289.     method to send other control characters to your printer for things 
  290.     such as underlining, etc. 
  291.  
  292.     The screen format is used as the printer format by default.
  293.  
  294.  
  295. Tutorial 
  296.  
  297.     In this tutorial section, we will show you, step by step, 
  298.     how to create a database for a mailing list, and how to put it in
  299.     practical use.  Even though all of the mailing list files discussed in
  300.     this tutorial are on the disk, we urge you to go into your favorite
  301.     editor and at least look at the files!  
  302.  
  303.     STEP 1 
  304.     The first thing that you must decide is what data you want to 
  305.     keep track of in this mailing list.  A couple of things you
  306.     would want to put in a mailing list would be: 
  307.  
  308.         First Name
  309.         Last Name
  310.         Address
  311.         City
  312.         State
  313.         Zip Code
  314.         Telephone
  315.  
  316.  
  317.     STEP 2  
  318.  
  319.     You must decide how big each field should be.  Let's say we 
  320.     decide on the following sizes:  
  321.     
  322.         First Name    15 characters 
  323.         Last Name    15     "
  324.         Address    25     "
  325.         City    25     "
  326.         State    2      " 
  327.         Zip Code    9   digits
  328.         Telephone    10  digits 
  329.  
  330.     Now that you have decided on the size of each field, you must 
  331.     also determine the layout of the record for the screen.  For 
  332.     example, you could decide to have both the first and last names 
  333.     on the first line, the Address on the third line by itself, and
  334.     the Address, City, and State on the fith line, with the Zip Code
  335.     on the seventh line, underneath the State, and the telephone
  336.     number beneath that. You may also decide to put dashes in the 
  337.     proper places on the Zip Code and the Telephone number, something
  338.     like:
  339.  
  340.     01234567890123456789012345678901234567890123456789012345678901234567
  341.  
  342.     First Name: _______________             Last Name: _______________
  343.  
  344.     Address: _________________________
  345.  
  346.     City: _________________________         State: __
  347.  
  348.     Zip Code: #####-####
  349.  
  350.     Telephone Number: (###) ###-####
  351.  
  352.  
  353.     STEP 3
  354.  
  355.     From this, you can build your format file.  Consider each portion
  356.     of a line in a format file. Each line of a format file consists of:  
  357.  
  358.         1) A Label 
  359.         2) A Row Number 
  360.         3) A Column Number 
  361.         4) A Page Number (currently unimplemented, use 1) 
  362.         5) An Output Format (used only with formulas) 
  363.         6) A Formula (optional) 
  364.         7) An Input Format (optional) 
  365.  
  366.     The fields of the format file are separated by commas. In our example,
  367.     the first name field of our mailing list would be:
  368.  
  369.         First Name, 1, 1, 1, , , _______________, 
  370.  
  371.     This says that the field "First Name" is in row 1, column 1 on 
  372.     page 1; there is no special output format or formula, and that
  373.     the input is 15 alphanumeric characters.  
  374.     
  375.     Now, if we just go ahead and interpret the rest of our mailing 
  376.     list, we can make our own format file.  It will look something 
  377.     like this:  
  378.  
  379.         First Name,1,1,1,,,---------------,-------------------------,
  380.         City,5,1,1,,,------------------------,
  381.         State, 5, 40, 1, , , --, 
  382.         Zip Code, 7, 1, 1, , ,#####-####, 
  383.         Telephone Number, 9, 1, 1, , , (###) ###-####,
  384.  
  385.     STEP 4 
  386.     Since HyperBase thinks that all format files end in a ".fmt", 
  387.     call this file "mail.fmt" when saving it.  Now, since one of 
  388.     the objectives in having a mailing list was to print mailing 
  389.     labels, you may want to design a format that will be the mailing 
  390.     label itself to be used as the printer format file.   On a 
  391.     mailing label you would want to put:
  392.  
  393.         1) The first and last name joined together.  
  394.         2) The address.  
  395.         3) The city, state, and zip code.  
  396.  
  397.     Ignore all of the other fields since there is no need for them
  398.     on the mailing label.  The physical size of the mailing label
  399.     is 6 lines of text, and you want one line above the information 
  400.     on the label, and one line below.  This makes a four line 
  401.     mailing label, which looks something like
  402.  
  403.         First and Last Name 
  404.         Address 
  405.         City,  State Zip Code
  406.  
  407.     Once again, we can take this one step further and build a format file
  408.     from this. It would look something like this:
  409.  
  410.         , 2, 1, 1, ------------------------------,{1} & " " & {2}, , 
  411.         , 3, 1, 1, ------------------------------, {3}, , 
  412.         , 4, 1, 1, ------------------------------, {4} & "\, " & {5}, , 
  413.         , 5, 25, 1, #####-####, {6}, , 
  414.         , 6, 1, 1, , , , 
  415.         
  416.     These different formats say that on line 2, column 1 there is
  417.     a string of 30 characters to print out that is the concatenation 
  418.     of fields 1 and 2.  They then say that on line 3, column 1, 
  419.     there is another string of 30 characters that is the same as 
  420.     field 3 in the datafile.  The third line in the format file says
  421.     that there is on line 4, column 1, a string of 30 characters
  422.     made up of field 4 (City) followed by a comma and a space and 
  423.     then field 5 (State).  The fourth line just says that on line 4,
  424.     column 25, that the 6th field (Zip Code) should be printed out.
  425.     The fifth line just says print a blank line for line 6.  
  426.     
  427.     You have just finished a quick tutorial on getting started using 
  428.     HyperBase.  You should now be able to insert records into your 
  429.     newly formed mailing list and even print out mailing labels using 
  430.     either the print entire database option or print selected records 
  431.     using the print search results option. 
  432.     
  433.  
  434. Formats for HyperBase Files
  435.  
  436.     In HyperBase, there are 3 different types of files.  There is the
  437.     format file, which has been discussed earlier, the sort index file,
  438.     and the data file.
  439.  
  440.     The data file itself is one of the more flexible features of
  441.     HyperBase.  In the design of HyperBase, we all looked back on our
  442.     experiences with databases and decided that one of the more useful
  443.     options that we would have liked other databases to have, is to
  444.     have an easily readable datafile.  We thought that if the datafile
  445.     was readable, it would be much easier for the user to relate to the
  446.     datafile, and much easier to fix corrupted datafiles.
  447.  
  448.     In a datafile, the first thing on each line is a flag character
  449.     which marks a record as present or deleted.  If you have just
  450.     opened a new datafile or used "CleanUp" there will be no records
  451.     marked deleted.  The deleted flag gets set every time you delete a
  452.     record, or make changes to it.  When you change a record, HyperBase
  453.     flags the current copy as deleted and appends a new record with the
  454.     updated information at the bottom of the file.  This makes it very
  455.     simple to recover from mistakes.
  456.  
  457.     Following the flag character the fields of your data format are
  458.     enclosed in quotes and separated by commas.  For example, if you
  459.     had a record from the mailing list used in the tutorial, it could
  460.     look something like this:
  461.  
  462.     "H","Craig","Norborg","539 N Grant Street","West Lafayette","IN","47904",
  463.  
  464.     The "H" in quotes at the beginning of the line tells me that the
  465.     record is not deleted, if a "D" were there, it would be flagged as
  466.     deleted.  Feel free to go in with your favorite editor and edit
  467.     your datafiles if you prefer this method, it will not affect the
  468.     database as long as you don't mess up the quotes or commas.
  469.     However this will invalidate the index file, which must be rebuilt
  470.     using the "Sort" option from the main menu.  You should also feel
  471.     free to write your own programs to work with the datafile.
  472.  
  473.     The index file is more complex than the datafile and is not in
  474.     human readable form. The index file format is liable to change
  475.     between releases.
  476.  
  477.  
  478.     HyperBase Quick Reference Sheet 
  479.     -------------------------------
  480.  
  481.             HyperBase Main Menu 
  482.             -------------------
  483.  
  484.     Command        Key Equiv    Command        Key Equiv    
  485.     New            A-n         Print        A-p 
  486.     Cleanup        A-c        Quit        A-q 
  487.     View        A-v        Insert      A-i
  488.     Search        A-s            Display(Screen)    A-d 
  489.     Display(Printer)    A-r        Delete Found    A-f 
  490.     Delete Not Found    A-!        Sort(Order)    A-o 
  491.     Save                 Sort Index    A-x 
  492.  
  493.     
  494.         HyperBase Browse Menu 
  495.         ---------------------
  496.  
  497.     Command         Key Equiv       Command        Key Equiv
  498.     Redraw        A-r            Save        A-s 
  499.     Quit        A-q        Kill Field    A-k 
  500.     Delete        A-d        Forward        A-f 
  501.     Back        A-b        Goto        A-g 
  502.  
  503.    
  504.            Invoking HyperBase 
  505.            ------------------
  506.    
  507.    HyperBase DataFileName BufferSize 
  508.  
  509.     Example:  
  510.  
  511.         HyperBase Datafile 200 
  512.         
  513.  
  514.     Special characters in files:
  515.  
  516.     Format Characters:
  517.         _       AlphaNumeric Input Field                
  518.         \    Literal next character
  519.         ^       Lock Field                              
  520.         #       Numeric Input Field 
  521.         ,    Separate Fields
  522.  
  523.     Formula Characters:
  524.         +       Addition 
  525.         -    Subtraction
  526.         &       Catenate Strings 
  527.         /    Division                                
  528.         "    Enclose literal strings
  529.         *    Multiplication                          
  530.         []      Substring Operations
  531.  
  532. HyperBase Copyright Notice:
  533. HyperBase is copyright 1987 by General Design.
  534. The binaries may be distributed free of charge by anyone to anyone.
  535. Special permission must be obtained to distribute HyperBase for a fee.
  536. ( This permission is extended to all non-profit User's Groups for the
  537. purpose of defraying copy & distribution costs) If you like HyperBase
  538. send $25.00 to:
  539.  
  540.         General Design
  541.         P.O. Box 2352
  542.         West Lafayette,  IN  47906
  543.  
  544. For your $25.00 you will recieve the latest binary, manual and
  545. examples. You will also be placed on our mailing list and will
  546. be notified of bug-fixes and new releases.
  547.  
  548. If you think that $25.00 is too much or you don't like HyperBase send
  549. us a note telling why.
  550.  
  551. HyperBase Sources:
  552. Hyperbase source is available for the Amiga(tm) personal computer.  It
  553. was written in Manx Aztec(tm) C.  We offer single user, site and
  554. distribution licenses for a small fee.  We also offer educational
  555. discounts. Write us at:
  556.  
  557.         General Design
  558.         P.O. Box 2352
  559.         West Lafayette,  IN  47906
  560.  
  561.